package demo02;

import java.util.LinkedList;

public class demo4 {
    public static void main(String[] args) {
        LinkedList<Integer> linkedList = new LinkedList<>();
        linkedList.add(1);
        linkedList.add(2);
        linkedList.add(3);
        linkedList.add(4);
        System.out.println(linkedList.toString());
        System.out.println(linkedList.get(2));
        System.out.println(linkedList.indexOf(3));

        linkedList.set(2,100);
        linkedList.remove(3);
        linkedList.size();
        System.out.println(linkedList.toString());
    }
}
